Repository navigation
feat(report): write the opt-in step sections in Rust - #489
Merged
Merged
Conversation
Step 9b and the STRANGER module asked the image's Python where the stranger package lives. Find the catalog under the lib directory of the prefix the stranger command is installed in instead. Same path in the pinned image; more than one match or none stops the step. Bead: port-vendor-oneliners
…without Python Step 18, the CNVPYTOR module and the CNVpytor image test find the package data directory with find under the cnvpytor command's prefix, and require exactly one. The module now stops when none is found instead of copying the resources to /. The Cyrius image test reads the installed version from the wheel's METADATA. Bead: port-vendor-oneliners
The checks of .github/scripts/site-check.py, ported with the same ERROR lines: dangling links and images, missing fragments, .md links, rooted links outside the prefix, stray pages, published Python, count tokens, tags that hide the page, copy buttons, the home page, site_url, and the zensical.toml plugin, feature, variant, redirect and llmstxt checks. Bead: port-site-check
The site check now runs after og is built, and the Python script it replaces is gone. Bead: port-site-check
og report render now writes CHIP, viral DNA, MEI, MoChA, VNtyper, Locityper, Exomiser, telomere content and runs of homozygosity, each a function from its summary section to both reports' lines, registered in chapters::writer. The SV caller blocks and the cDNA scan lines are public parts for the structural-variant and ClinVar sections, which the clinical sections compose. Cards gain tables (Line::Table) with a Viewer column, and a fixed stat text written as render_report.py's stat() writes it. When the BAM had no unplaced unmapped read, the viral section says no genome was assessed instead of "No read on any of the N viral genomes" (follow-up 454). Bead: D1 Bead: D10 Bead: D14
Eight report-render cases put every opt-in section in each state and down the branches of its lines: ok, stale, failed, unreadable, an unknown state, new since a previous run, empty results and partial results. The oracle keeps the nine sections, and leaves out the chart figures until the charts are ported. Bead: D1 Bead: D10
The tool checks of test_{chip,viral,mei,mocha,vntyper,locityper,exomiser}_report.py
go to og-chip's and og-reports' tests, the summary checks to
og-summary's tests/optin_summary.rs, and the report checks to
og-render's tests/optin_report.rs. run-all.sh's plan of step 53, its
switches and the DONE guards go to a fake-docker case. The seven Python
files are deleted, and the references to them point at the new tests.
Bead: D1
Bead: D14
Bead: D1 Bead: D14
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 32 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…ng silently The new sh lookup exits 1 when it finds no single data directory, and set -e then stopped step 18 before its error message. Fall back to an empty answer so the case check prints the error. The fake-docker case now answers the new lookup, and exits 1 for no data as the real one does.
The one deliberate output change of the opt-in sections, the viral line when the BAM has no unplaced unmapped reads, now has its own parity case, m-optin-viral-na, with goldens for both reports. The table variant and its types move next to the stat line, and the changelog entry below the first one, so the sibling report ports that add a line kind after the list merge without a conflict there.
Its goldens held the whole opt-in corpus, and the Locityper row with a synthetic star-allele call tripped the personal-data scan. The case now changes only the viral section, so its goldens hold the frame and that section.
…rors
A quoted URL, fragment or config value holding a character above U+00FF
made pycompat's repr refuse, and site-check fell back to Rust's Debug
format (Str("a–b"), Array([...])). site-check now writes the repr itself:
printable characters as written, unprintable ones as \xNN, \uNNNN or
\UNNNNNNNN, the same quote rule, recursing into lists and tables.
Tests: a fragment with non-Latin-1 characters, a features list holding
one, and plugins given as a plain string.
# Conflicts: # rust/crates/og-dev/src/lib.rs
…r-oneliners into the GeiserX#489 tip
geiresx
pushed a commit
to geiresx/OwnGenome
that referenced
this pull request
Nov 18, 2026
GeiserX#489 brought the shared table model to og-render. GeiserX#484's own Table, its Layout and Line::ViewerNote go: the PGx and mitochondrial tables are built from main's Table and Cell, the Viewer column as a last Cell::Viewer, whose table writes the Viewer sentence. Main's one_line flag becomes a Layout with a third value, RowLines, the unindented rows GeiserX#484's CPIC table needs. One VIEWER_URL, in html.rs. cases.tsv and report-corpus.sh keep both sides' cases; the duplicate chart filter is dropped. remnants.tsv keeps the importers both sides still have.
geiresx
pushed a commit
to geiresx/OwnGenome
that referenced
this pull request
Nov 18, 2026
The clinical sections of GeiserX#487 wrote their tables as markup strings with their own Viewer cell, Viewer header and VIEWER_URL. They now build Line::Table rows of Cell values, like GeiserX#489's sections, and html.rs writes every table and the one VIEWER_URL. The Viewer sentence is now its own line, Line::ViewerNote, placed by the card: the SF card puts it after its paragraphs and the AnnotSV card after both of its tables, where render_report.py has it. The model also gets the cell parts the traits table needs (a break, a small grey line, a cell of several parts) and a folded table.
geiresx
pushed a commit
to geiresx/OwnGenome
that referenced
this pull request
Nov 18, 2026
…d golden The golden of m-optin-viral-na was written when only GeiserX#489's sections were ported. With the clinical, ancestry, genome, PGx, HLA and mito sections ported too, the oracle's filtered report shows them, so the golden is the oracle's report again with only the viral sentences changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
og report renderwrote only the frame, QC and variant calling. The sections of the opt-in steps still lived only inbin/render_report.py, and their checks lived in seven Python test files. For 1.0.0 the reports must come from Rust, with the same meaning, and with no Python test left behind.One wording was also wrong. When the BAM has no unplaced unmapped reads, step 47 looks at no viral genome. The report still said "No read on any of the 24 viral genomes", which reads as a negative result (follow-up 454).
Fix
og report rendernow writes nine sections in both reports: CHIP with its detection limit (step 49), viral DNA (step 47), MEI (step 50), MoChA (step 51), VNtyper (step 52), Locityper (step 53), Exomiser (step 48), telomere content and runs of homozygosity. Each is a function from its summary section to report lines, with one registry line per section inchapters::writer.m-optin-viral-naholds it as a golden.Line::Table,TableandCellinmodel.rs, their rendering inhtml.rs). These are additions to two shared files; nothing there changes for the sections already ported.tests/test_{chip,viral,mei,mocha,vntyper,locityper,exomiser}_report.pymoved to cargo tests and one fake-docker case. The table below maps each one. The seven Python files are deleted, andtests/parity/remnants.tsvno longer lists them as importers.Where each Python check went
Test paths are
rust/crates/<crate>/tests/<file>.rs::<fn>.Decisions
Cellcovers text, a badge, a text with a grey sub-line and the Viewer link;Tablehas the head, the rows,viewerandone_line. A later report section should build aLine::Tablefrom these types and not add a second table type or a secondVIEWER_URL. The table variant sits afterStatinLine, so a sibling port that adds a line kind afterListmerges without a conflict in that enum.port_report_core.rsexpects the ROH and telomere frames on a plain summary now, because those two cards show whether or not their step ran, as in the Python.docs/50-mei.md,assets/chip_genes.tsvandversions.env(a comment only, no pin changes).Table, aLine::Tableand aVIEWER_URLto the same two files, so the second of the two to land gets a conflict there. This PR'sTablecan hold refactor(report): render the PGx, HLA and mitochondrial sections with og #484's tables: a plain cell isCell::Text, and its viewer column is a lastCell::Viewer. The PR that lands second merges main and builds its tables from the model already on main. It does not add a second table type. The conflicts inCHANGELOG.md,tests/parity/cases.tsvand theLineenum resolve by keeping the rows of both sides.m-optin-viral-nasummary fixesgenerated_utc, so its goldens do not depend on the clock.How it was checked
scripts/ci/oracle-diff.sh report-renderagrees on all 534 items in 108 cases. That includes the ninem-optin-*cases (ok, stale, failed, unreadable, unknown state, new since, empty, partial, viral not assessed).m-optin-viral-napasses on its goldens.m-optin-ok,c-fullandall, andthe_chip_limit_sentencein og-render'stests/optin_report.rsfailed. Both plants were reverted.no_unplaced_reads_is_not_assessed_not_no_readfailed, andm-optin-viral-nareported 2 differing items, one in each report.port-report-optin-locityper, og, unit tests, images): https://github.com/GeiserX/OwnGenome/actions/runs/44162554358og report render, because no step calls it yet. Outside Rust and the tests, the PR changes only comment lines (assets/chip_genes.tsv,versions.env) and one doc sentence.Beads: D1 (the Rust port carries the Python's place in 1.0.0), D10 (all thresholds approved), D14 (everything goes into 1.0.0).